#include "element2d.h"
#include <cassert>

using namespace CoreLib::MathLib ; 
Element2D::Element2D( const ValueType & val ) : IElement(), m_Value(val)
{
};
bool Element2D::operator ==(const CoreLib::MathLib::Element2D &rhs)
{
	if ( rhs.value().first == m_Value.first || rhs.value().second == m_Value.second ) 
		return true ; 
	return false ; 
};
void Element2D::setValue(const CoreLib::MathLib::Element2D::ValueType &value)
{
	m_Value.first = value.first ; 
	m_Value.second = value.second ; 
};
Element2D & Element2D::operator =(const CoreLib::MathLib::Element2D &rhs)
{
	// in therms of operator=(ValueType & ) 
	return operator=(rhs.value());
};
Element2D & Element2D::operator=(const ValueType & val )
{
	// in therms of setValue() ; 
	setValue(val ) ; 
	return *this ; 
};